import 'package:spendbook/common/http.dart';

class App extends Http {
  App(this.platform);

  String? version;

  String platform;

  String? androidUrl;

  String? appleStore;

  Future<bool> checkUpgrade(String _version) async {
    Map<String, dynamic> res = await httpGet('/app/' + platform.toString());
    if (res['version'] == _version) {
      return false;
    }
    version = res['version'];
    androidUrl = res['androidUrl'];
    appleStore = res['appleStore'];
    return true;
  }
}
